<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8"/>
    <title> 4-7 来来回回(Do...while循环)</title>
    <link rel="stylesheet" type="text/css" href="../../../css/style.css"/>
    <style type="text/css">
    </style>

    <script type="text/javascript">
        function test(){
            var num=1;
            do{
                document.write("数值为:"+num+"<br>");
                num++;
            }
            while(num<=5)
        }


        var mynum =6;   //mynum初值化数值为6
        do
        {
            document.write("数字:"+mynum+"<br/>");
            mynum=mynum-1;
        }
        while(mynum>=6)
    </script>
</head>

<body>
<div align="center">
    <p><a href="../../index.php#jsjjp" class="fontSize" title="点击进入该目录">目录</a></p>
</div>

<input type="button" value="点击查看do循环输出5条数据" onclick="test()">

<script type="text/javascript">

</script>

</body>
</html>
